package com.wuyan.web.base.repo;

import com.wuyan.web.base.entity.PubArticleLiked;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;


/**
 * repository for PubArticleLiked generated by jpa-codegen
 * TODO
 *
 * @author wuyan
 * @date 2021-06-07 18:41:06
 */

@Repository
public interface PubArticleLikedRepo extends JpaRepository<PubArticleLiked, Integer>, QuerydslPredicateExecutor<PubArticleLiked> {
    /**
    * 批量删除
    * @param ids 主键
    * @return int
    */
    @Modifying
    @Query("delete from PubArticleLiked where id in (:ids)")
    int deleteAll(@Param("ids") List<Integer> ids);
}